const express=require('express');
const route=express.Router();
const pool=require('../pool')
const bodyParser=require("body-parser");
route.get('/list',(req,res)=>{
  let sql="select * from teacher";
  pool.query(sql,(err,result)=>{
    if(err) throw err;
    console.log(result);
    res.json({
      code:200,
      msg:"success",
      data:result
    });
  });
});
module.exports=route;